package com.qfjy.controller;

import com.qfjy.common.util.result.ResultCode;
import com.qfjy.common.util.result.ResultJson;
import com.qfjy.service.RoleService;
import com.qfjy.service.impl.RoleServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/role")
@Slf4j
@Controller
@Api(tags = {"角色模块"})
public class RoleController {
    @Autowired
    private RoleService roleService;


    @ApiOperation(value = "查询所有的角色信息")
    @GetMapping("/list")
    @ResponseBody
    public ResultJson list() {
        return new ResultJson(roleService.selectList(), ResultCode.SUCCESS);
    }



}
